package com.zy.cat.entity.run;

import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @info 9趣猫运动步数兑换现金豆记录
 * @author Link
 * @date 2019-10-30 09:14
 */
@Entity
@Table(name = "zy_cat_run_step_convert_history", indexes = {
		@Index(name = "pid", columnList = "pid"),
		@Index(name = "fid", columnList = "fid"),
		@Index(name = "sid", columnList = "sid"),
		@Index(name = "ctype", columnList = "ctype"),
		@Index(name = "fstatus", columnList = "fstatus"),
		@Index(name = "dstatus", columnList = "dstatus"),
		@Index(name = "jstatus", columnList = "jstatus"),
		@Index(name = "stime", columnList = "stime"),
		@Index(name = "etime", columnList = "etime")})
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("9趣猫运动步数兑换现金豆记录")
public class DailyStepCoinsHistory {
	
	@Id
	@Column(columnDefinition = "CHAR(32) NOT NULL  COMMENT '中奖ID[9趣猫运动步数兑换现金豆记录]'")
	@ApiModelProperty(value = "中奖ID", example = "c9adb120ca2b48f88626ebd35000fa08")
	private String fid=UUID.randomUUID().toString().replace("-", "");
	
	@Column(columnDefinition = "CHAR(32) NOT NULL COMMENT '加速ID'")
	@ApiModelProperty(value = "加速ID", example = "a4fa29641")
	private String sid;

	@Column(columnDefinition = "VARCHAR(20) NOT NULL COMMENT '用户账号ID'")
	@ApiModelProperty(value = "用户账号ID", example = "a4fa29641")
	private String pid;
	
	@Column(columnDefinition = "INT(2) DEFAULT '0' COMMENT '金豆类型（0.金豆兑换、1.步数金豆1、2.步数金豆2、3.步数金豆3、）'")
	@ApiModelProperty(value = "金豆类型（0.金豆兑换、1.步数金豆1、2.步数金豆2、3.步数金豆3、）", example = "1")
	private int ctype;
	
	@Column(columnDefinition = "INT(5) DEFAULT '0' COMMENT '数量'")
	@ApiModelProperty(value = "数量", example = "6")
	private long dcount;
	
	@Column(columnDefinition = "INT(1) DEFAULT '0' COMMENT '翻倍状态（0.未翻倍、1.已翻倍）'")
	@ApiModelProperty(value = "翻倍状态（0.未翻倍、1.已翻倍）", example = "0")
	private int fstatus;
	
	@Column(columnDefinition = "INT(1) DEFAULT '0' COMMENT '兑换状态（0.未兑换、1.已兑换）'")
	@ApiModelProperty(value = "兑换状态（0.未兑换、1.已兑换）", example = "0")
	private int dstatus;
	
	@Column(columnDefinition = "INT(1) DEFAULT '0' COMMENT '加速状态（0.未加速、1.已加速）'")
	@ApiModelProperty(value = "加速状态（0.未加速、1.已加速）", example = "0")
	private int jstatus;
	
	@Column(columnDefinition = "VARCHAR(20) NOT NULL  COMMENT '开始时间'")
	@ApiModelProperty(value = "开始时间", example = "2019-02-22 10:10:10")
	private String stime;
	
	@Column(columnDefinition = "VARCHAR(20) NOT NULL  COMMENT '结束时间'")
	@ApiModelProperty(value = "结束时间", example = "2019-02-22 10:10:10")
	private String etime;
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '最后更新时间'")
	@ApiModelProperty(value = "最更新放时间", example = "2019-02-22 10:10:10")
	private String ltime;
	
	public DailyStepCoinsHistory(String pid) {
		this.pid=pid;
	}

	public DailyStepCoinsHistory(String sid, String pid, int ctype, long dcount, int fstatus, int dstatus, int jstatus,
			String stime, String etime, String ltime) {
		super();
		this.sid = sid;
		this.pid = pid;
		this.ctype = ctype;
		this.dcount = dcount;
		this.fstatus = fstatus;
		this.dstatus = dstatus;
		this.jstatus = jstatus;
		this.stime = stime;
		this.etime = etime;
		this.ltime = ltime;
	}

	public DailyStepCoinsHistory(String sid, String pid, int ctype, long dcount, int fstatus, int dstatus, int jstatus,
			String stime, String ltime) {
		super();
		this.sid = sid;
		this.pid = pid;
		this.ctype = ctype;
		this.dcount = dcount;
		this.fstatus = fstatus;
		this.dstatus = dstatus;
		this.jstatus = jstatus;
		this.stime = stime;
		this.ltime = ltime;
	}

}
